# -*- coding: utf-8 -*-
#   各种不同样式的button
# @Time    ： 2023/10/23  11:38
# @Auther  ： 徐良
# File     :  buttons.py
from PySide6.QtWidgets import QPushButton


class PushButton1(QPushButton):
    def __init__(self, parent=None):
        super(PushButton1, self).__init__(parent)

        self.css1 = """
            QPushButton {
                background-color: #007bff;
                color: #fff;
                border: 1px solid #007bff;
                border-radius: 5px;
                padding: 10px 20px;
                font-size: 16px;
            }

            QPushButton:hover {
                background-color: #0056b3;
            }

            QPushButton:pressed {
                background-color: #003E7D;
            }
        """

        # 红字
        self.css2 = """
                    QPushButton {
                        background-color: #007bff;
                        color: red;
                        border: 1px solid #007bff;
                        border-radius: 5px;
                        padding: 10px 20px;
                        font-size: 16px;
                    }

                    QPushButton:hover {
                        background-color: #0056b3;
                    }

                    QPushButton:pressed {
                        background-color: #003E7D;
                    }
                """

        self.setStyleSheet(self.css1)

class PushButton21(QPushButton):
    def __init__(self, parent=None):
        super(PushButton21, self).__init__(parent)

        self.css21 = """
            QPushButton {
                background-color: #3498db;
                border: 2px solid #3498db;
                color: white;
                padding: 3px 20px; /* 设置上下内边距为10px，左右内边距为20px */
                border-radius: 10px;
                font: 75 10pt "微软雅黑";
                text-align: left;
            }
            QPushButton:hover {
                background-color: #2374a8;
                border: 2px solid #2374a8;
            }
            QPushButton:pressed {
                background-color: #195f8e;
                border: 2px solid #195f8e;
            }
            """
        self.setStyleSheet(self.css21)


from PySide6.QtWidgets import QPushButton

from PySide6.QtWidgets import QPushButton


class PushButtonToolBox(QPushButton):
    def __init__(self, parent=None):
        super(PushButtonToolBox, self).__init__(parent)
        self.setStyleSheet("""
        QPushButton {
                background-color: #3498db;
                border: 2px solid #3498db;
                color: white;
                padding: 3px 20px; /* 设置上下内边距为10px，左右内边距为20px */
                border-radius: 10px;
                font: 75 10pt "微软雅黑";
                text-align: left;
            }
            QPushButton:hover {
                background-color: #2374a8;
                border: 2px solid #2374a8;
            }
            QPushButton:pressed {
                background-color: #195f8e;
                border: 2px solid #195f8e;
            }
            """)
